package com.kldy8.kldyw.tools;

import android.content.Context;
import android.support.annotation.ColorInt;

import com.kldy8.kldyw.Constant;
import com.kldy8.kldyw.R;

/**
 * Created by user on 2016/12/6.
 */

public class LabelColor
{
//    <string name="index_tv_6_5">录音师</string>
//    <string name="index_tv_6_6">摄影师</string>
//    <string name="index_tv_6_7">化妆师</string>
//    <string name="index_tv_6_8">造型师</string>
//    <string name="index_tv_6_9">灯光师</string>
//    <string name="index_tv_6_10">布景师</string>
//    <string name="index_tv_6_11">剪接师</string>
//    <string name="index_tv_6_12">监制</string>
//    <string name="index_tv_6_13">导演</string>
//    <string name="index_tv_6_14">服装</string>
//    <string name="index_tv_6_15">道具</string>

//    <string name="actor">演员</string>
//    <string name="recruit">招募</string>
//    <string name="investment">投资</string>
//    <string name="script">剧本</string>
//    <string name="solicitation">征集</string>
//    <string name="equipment">器材</string>
//    <string name="derivative">衍生品</string>



    public static @ColorInt int chooseColor(Context context, String sth)
    {
        int color = context.getResources().getColor(R.color.hpt_2);
        if (sth.contains(context.getString(R.string.index_tv_6_5))||sth.contains(context.getString(R.string.actor)))
        {
            return  context.getResources().getColor(R.color.hpt_1);
        }

        if (sth.contains(context.getString(R.string.index_tv_6_6))||sth.contains(context.getString(R.string.index_tv_6_15))||sth.contains(context.getString(R.string.index_tv_6_13)))
        {
            return  context.getResources().getColor(R.color.hpt_2);
        }
        if (sth.contains(context.getString(R.string.index_tv_6_7))||sth.contains(context.getString(R.string.index_tv_6_14))||sth.contains(context.getString(R.string.index_tv_6_16)))
        {
            return  context.getResources().getColor(R.color.hpt_3);
        }
        if (sth.contains(context.getString(R.string.index_tv_6_8))||sth.contains(context.getString(R.string.index_tv_6_11)))
        {
            return  context.getResources().getColor(R.color.hpt_4);
        }
        if (sth.contains(context.getString(R.string.index_tv_6_9))||sth.contains(context.getString(R.string.index_tv_6_12)))
        {
            return  context.getResources().getColor(R.color.hpt_5);
        }
        if (sth.contains(context.getString(R.string.index_tv_6_10))||sth.contains(context.getString(R.string.actor)))
        {
            return  context.getResources().getColor(R.color.hpt_6);
        }

        return color;

    }
}
